package com.gupao.vip.mic.javaapi;

import java.util.concurrent.CountDownLatch;
import org.apache.zookeeper.WatchedEvent;
import org.apache.zookeeper.Watcher;


public class LockWatch implements Watcher{
	 private CountDownLatch latch;
	 public LockWatch(CountDownLatch latch) {
	        this.latch = latch;
	    }
	 
	 
	public void process(WatchedEvent event) {
		if(event.getType()==Event.EventType.NodeDeleted){
			latch.countDown();
		}
		
	}

}
